package com.jumi.microservice.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jumi.microservice.domain.Message;
import com.jumi.microservice.domain.vo.MessageUnreadVO;
import com.jumi.microservice.mapper.MessageMapper;
import com.jumi.microservice.service.MessageService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = Exception.class)
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {

    @Resource
    private MessageMapper messageMapper;


    @Override
    public MessageUnreadVO SystemNewNum(Long uids) {
        MessageUnreadVO vo = messageMapper.selectUnread(uids);
        return vo;
    }
}
